<!DOCTYPE html>

<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>登录</title>
		<link rel="stylesheet" type="text/css" href="#(ctx??)/common/lib/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="#(ctx??)/common/css/login.css" />
	</head>

	<body class="beg-login-bg">
		<div class="beg-login-box">
			<header>
				<h1>后台登录</h1>
			</header>
			<div class="beg-login-main">
				<form action="#(ctx??)/admin/login/doLogin" class="layui-form" method="post">
					<div class="layui-form-item">
						<label class="beg-login-icon">
	                        <i class="layui-icon">&#xe612;</i>
	                    </label>
						<input type="text" name="username" lay-verify="userName" autocomplete="off" placeholder="这里输入登录名" class="layui-input">
					</div>
					<div class="layui-form-item">
						<label class="beg-login-icon">
	                        <i class="layui-icon">&#xe642;</i>
	                    </label>
						<input type="password" name="password" lay-verify="password" autocomplete="off" placeholder="这里输入密码" class="layui-input">
					</div>
					<div class="layui-input-inline"style="width: 100px;">
				    	<input type="text" name="captcha" required  lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
				    </div>
				    <div class="layui-input-inline"style="width: 0px;">
				      	<img alt="验证码出错啦~!" src="#(ctx??)/admin/login/img">
				    </div>
					<div class="layui-form-item">
						<div class="beg-pull-left beg-login-remember">
							<label>记住帐号？</label>
							<input type="checkbox" name="rememberMe" value="true" lay-skin="switch" checked title="记住帐号">
						</div>
						<div class="beg-pull-right">
							<button class="layui-btn layui-btn-primary" lay-submit lay-filter="login">
                            <i class="layui-icon">&#xe650;</i> 登录
                        </button>
						</div>
						<div class="beg-clear"></div>
					</div>
				</form>
			</div>
			<footer>
				<!-- <p>Beginner © www.zhengjinfan.cn</p> -->
			</footer>
		</div>
		<script type="text/javascript" src="#(ctx??)/common/lib/layui/layui.js"></script>
		<script>
			layui.use(['layer', 'form'], function() {
				var layer = layui.layer,
					$ = layui.jquery,
					form = layui.form();
					layer.alert("用户名:li<br/>密码:liyang");
				  //监听提交
				  form.on('submit(login)', function(data){
				    return true;
				  });
				  
				  var err = "#(error??)";
				  if(err){
					  layer.msg(err, {icon: 5,anim:6}); 
				  }
			});
		</script>
	</body>

</html>